package sg.edu.nus.iss.billing;

import java.io.File;

import junit.framework.TestCase;

import org.junit.AfterClass;
import org.junit.BeforeClass;

import sg.edu.nus.iss.billing.datastore.DBFactory;


public class BasicTestCase extends TestCase{
	
	protected DBFactory factory = null;
	
	

	public BasicTestCase() {
		super();
		factory = DBFactory.instance();
		factory.setStoragePath(DBFactory.TEST_STORE_FOLER);
		File file = new File(DBFactory.TEST_STORE_FOLER);
		//create folder for store testing data
		if(!file.exists()){
			file.mkdir();
		} else {
			//delete all old data
			File fs[] = file.listFiles();
			if (fs!=null) {
				for (File f : fs) {
					f.delete();
				}
			}
		}
	}

	@BeforeClass
	public static void setUpBeforeClass() throws Exception {

		
	}

	@AfterClass
	public static void tearDownAfterClass() throws Exception {

	}
}
